package com.yanqu.road.logic.bussiness.player;

import com.yanqu.road.logic.bussiness.DaoHelper;
import com.yanqu.road.entity.estatewar.EstateFloorInfo;
import com.yanqu.road.entity.estatewar.EstateWarRecord;
import com.yanqu.road.entity.estatewar.UserEstateFloor;
import com.yanqu.road.entity.estatewar.UserEstateWarData;

import java.util.LinkedList;
import java.util.List;
import java.util.Map;

public class UserEstateWarBussiness {

    public static Map<Long, UserEstateWarData> getUserEstateWarDataMap() {
        return DaoHelper.getUserEstateWarDaoImpl().getUserEstateWarDataMap();
    }

    public static UserEstateWarData getUserEstateWarData(long userId) {
        return DaoHelper.getUserEstateWarDaoImpl().getUserEstateWarData(userId);
    }

    public static boolean addUserEstateWarData(UserEstateWarData userEstateWarData) {
        return DaoHelper.getUserEstateWarDaoImpl().add(userEstateWarData);
    }

    public static boolean updateUserEstateWarData(UserEstateWarData userEstateWarData) {
        return DaoHelper.getUserEstateWarDaoImpl().update(userEstateWarData);
    }

    public static Map<Integer, Map<Integer, UserEstateFloor>> getUserEstateFloorMap() {
        return DaoHelper.getUserEstateFloorDaoImpl().getUserEstateFloorMap();
    }

    public static boolean initUserEstateFloorMap(Map<Integer, EstateFloorInfo> estateFloorInfoMap, Map<Integer, UserEstateFloor> userEstateFloorMap) {
        return DaoHelper.getUserEstateFloorDaoImpl().initUserEstateFloorMap(estateFloorInfoMap, userEstateFloorMap);
    }

    public static boolean updateUserEstateFloorList(List<UserEstateFloor> userEstateFloorList) {
        return DaoHelper.getUserEstateFloorDaoImpl().updateUserEstateFloorList(userEstateFloorList);
    }

    public static LinkedList<EstateWarRecord> getEstateWarRecordList(long userId, int maxCount) {
        return DaoHelper.getEstateWarRecordDaoImpl().getEstateWarRecordList(userId, maxCount);
    }

    public static boolean addEstateWarRecord(EstateWarRecord estateWarRecord){
        return DaoHelper.getEstateWarRecordDaoImpl().add(estateWarRecord);
    }

    public static boolean updateEstateWarRecord(EstateWarRecord estateWarRecord){
        return DaoHelper.getEstateWarRecordDaoImpl().update(estateWarRecord);
    }
}
